import { defineStore } from 'pinia';
import { store } from '@/store';


export const useSystemStore = defineStore('system', {
    state: () => {
      return { 
            bottomIndex: 0,
        };
    },
    getters: {
      getBottomIndex() {
        return this.bottomIndex;
      },
    },
    // 也可以定义为
    // state: () => ({ count: 0 })
    actions: {
      setBottomIndex(index) {
        this.bottomIndex = index;
      },
    },
  });
  
  // Need to be used outside the setup
  export function useSystemStoreOut() {
    return useSystemStore(store);
  }